#include "head.h"

extern int pipe_fd[2];

void handler(int signal)
{
    if(signal == SIGINT)
    {
        write(pipe_fd[1], "huzhu", 5);

        if(wait(NULL) == -1)
            printf("wait error\n");
                wait(NULL);
        printf("父进程%d:已退出\n", getpid());
        exit(0);
    }
}